package com.maimao.info.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maimao.model.info.Collect;
import com.maimao.model.info.Coupon;
import com.maimao.model.info.vo.CouponSearch;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2021/1/5 4:34 下午
 */
public interface CollectMapper extends BaseMapper<Collect> {
    Collect selectByUserIdAndTidAndType(@Param("userId") Long userId, @Param("targetId") Long targetId, @Param("type") Integer type);

    /**
     * 批量添加
     * @param collects
     * @return
     */
    int insertBatch(@Param("collects") List<Collect> collects);

    List<Collect> selectByUserIdAndType(@Param("userId") Long userId, @Param("type") Integer type);

    int remove(@Param("id") Long id);
}
